package com.learner.pojo.blog;

import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.UpdateTimestamp;


import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
* @author ice2020x
* @Date: 2023/3/21
* @Description: 
**/
@ToString
@Data
@Entity
@Table(name = "blog_collection")
@GenericGenerator(name = "jpa-uuid", strategy = "uuid")
public class BlogColection implements Serializable {

    private static final long serialVersionUID = -7164912385879459393L;

    @Id
    @GeneratedValue(generator = "jpa-uuid")
    private String id;
    /**
     * 收藏者的id
     */
    private String userId;

    /**
     * 博客的id
     */
    private String blogId;

    /**
     * 作者id
     */
    private String postUserId;

    /**
     * 是否收藏
     */
    private boolean isCollect;

    /**
     * 是否点赞
     */
    private boolean isVoteUp;

    /**
     * 是否点踩
     */
    private boolean isVoteDown;

    @CreationTimestamp
    private Date createTime;

    @UpdateTimestamp
    private Date updateTime;

}
